/**
 * ios app entry
 * Created by justao
 */
'use strict';
import React, {
  AppRegistry,
  Platform,
  Component
} from 'react-native';

import { createStore } from 'redux';
import { Provider } from 'react-redux/native';

import App from './app/app';
import groupersApp from './app/reducers';

let store = createStore(groupersApp);

class Groupers extends Component {
  render() {
    return (
        <Provider store={store}>
          {() => <App />}
        </Provider>
    );
  }
}

AppRegistry.registerComponent('Groupers', () => Groupers);

if(Platform.OS == 'web'){
    var app = document.createElement('div');
    document.body.appendChild(app);
    AppRegistry.runApplication('Groupers', {
        rootTag: app
    })
}